<!--
 * @Author: fcli
 * @Date: 2023-09-04 10:32:44
 * @LastEditors: fcli
 * @LastEditTime: 2024-02-06 10:42:03
 * @FilePath: /anchor-point-page/src/App.vue
 * @Description: 
-->

<template>
    <anchor-point-page :authorData="authorData">
        <template #slot-scope="{ data }">
            <div class="li">{{ data.label }}</div>
        </template>
    </anchor-point-page>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import anchorPointPage from './plugin/index.vue';

const authorData = ref<any>(
    [{
        id: 1,
        label: '一级 1',
        children: [{
            id: 4,
            label: '二级 1-1',
            children: [{
                id: 9,
                label: '三级 1-1-1',
            }, {
                id: 10,
                label: '三级 1-1-2'
            }]
        }]
    }, {
        id: 2,
        label: '一级 2',
        children: [{
            id: 5,
            label: '二级 2-1',
            children: [{
                id: 11,
                label: '三级 2-1-1'
            }, {
                id: 12,
                label: '三级 2-1-2'
            }, {
                id: 13,
                label: '三级 2-1-3'
            }]
        }, {
            id: 6,
            label: '二级 2-2',
            children: [{
                id: 14,
                label: '三级 2-2-1'
            }, {
                id: 15,
                label: '三级 2-2-2'
            }, {
                id: 16,
                label: '三级 2-2-3'
            }]
        }]
    }, {
        id: 3,
        label: '一级 3',
        children: [{
            id: 7,
            label: '二级 3-1',
            children: [{
                id: 20,
                label: '三级 3-1-1'
            }, {
                id: 21,
                label: '三级 3-1-2'
            }, {
                id: 22,
                label: '三级 3-1-3'
            }]
        }, {
            id: 8,
            label: '二级 3-2',
            children: [{
                id: 17,
                label: '三级 3-2-1'
            }, {
                id: 18,
                label: '三级 3-2-2'
            }, {
                id: 19,
                label: '三级 3-2-3'
            }]
        }]
    }]
)
</script>
<style lang="less"></style>
